package org.xtense.rcp;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.console.IConsoleConstants;
import org.xtense.rcp.views.ConsoleFactory;
import org.xtense.rcp.views.NavigatorView;
import org.xtense.rcp.views.QueryView;

public class XtensePerspective implements IPerspectiveFactory {
	public static String Perspective_ID = "XtenseRCP.perspective";

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		
		IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.3f, editorArea);
		left.addView(NavigatorView.View_ID);
		
		IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.5f, "left");
		bottom.addView(QueryView.View_ID);
		
		layout.addView(IConsoleConstants.ID_CONSOLE_VIEW, IPageLayout.BOTTOM,
				0.7f, editorArea);
		ConsoleFactory.showConsole();
		
	}
}
